package com.student.model;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * ActivityAssociation entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "Activity_Association", schema = "dbo", catalog = "StudentManager")
public class ActivityAssociation implements java.io.Serializable {

	// Fields

	private Long activityAssociationId;
	private Student student;
	private ClassInfo classInfo;
	private ActivityList activityList;
	private Timestamp activityTime;
	private String activityResult;

	// Constructors

	/** default constructor */
	public ActivityAssociation() {
	}

	/** minimal constructor */
	public ActivityAssociation(Long activityAssociationId, String activityResult) {
		this.activityAssociationId = activityAssociationId;
		this.activityResult = activityResult;
	}

	/** full constructor */
	public ActivityAssociation(Long activityAssociationId, Student student,
			ClassInfo classInfo, ActivityList activityList,
			Timestamp activityTime, String activityResult) {
		this.activityAssociationId = activityAssociationId;
		this.student = student;
		this.classInfo = classInfo;
		this.activityList = activityList;
		this.activityTime = activityTime;
		this.activityResult = activityResult;
	}

	// Property accessors
	@Id
	@Column(name = "Activity_Association_id", unique = true, nullable = false, precision = 18, scale = 0)
	@GeneratedValue
	public Long getActivityAssociationId() {
		return this.activityAssociationId;
	}

	public void setActivityAssociationId(Long activityAssociationId) {
		this.activityAssociationId = activityAssociationId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "Student_id")
	public Student getStudent() {
		return this.student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "Class_id")
	public ClassInfo getClassInfo() {
		return this.classInfo;
	}

	public void setClassInfo(ClassInfo classInfo) {
		this.classInfo = classInfo;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "Activity_id")
	public ActivityList getActivityList() {
		return this.activityList;
	}

	public void setActivityList(ActivityList activityList) {
		this.activityList = activityList;
	}

	@Column(name = "Activity_Time", length = 23)
	public Timestamp getActivityTime() {
		return this.activityTime;
	}

	public void setActivityTime(Timestamp activityTime) {
		this.activityTime = activityTime;
	}

	@Column(name = "Activity_Result", nullable = false)
	public String getActivityResult() {
		return this.activityResult;
	}

	public void setActivityResult(String activityResult) {
		this.activityResult = activityResult;
	}

}